<?php
	class HeaderWidget extends CWidget
	{
		public function run()
		{
			$this->getheader();
		}
		public function getheader()
		{
			$criteria = new CDbCriteria;
			$criteria->condition = 'disabled=:status AND parent_id is null';
			$criteria->params = array(':status' => 1);
			$criteria->order = 'priority ASC';
			$menu = Menu::model()->findAll($criteria);
			$this->render('header', compact('menu'));
		}
	}
?>